﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace StatsData.Data.Migrations
{
    public partial class modify_t_bad_add_procedure_code : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "TYPE",
                table: "T_BAD",
                type: "NVARCHAR2(20)",
                maxLength: 20,
                nullable: true,
                oldClrType: typeof(string),
                oldType: "NVARCHAR2(600)",
                oldMaxLength: 600,
                oldNullable: true);

            migrationBuilder.AlterColumn<string>(
                name: "BAD_NAME",
                table: "T_BAD",
                type: "NVARCHAR2(50)",
                maxLength: 50,
                nullable: true,
                oldClrType: typeof(string),
                oldType: "NVARCHAR2(600)",
                oldMaxLength: 600,
                oldNullable: true);

            migrationBuilder.AddColumn<string>(
                name: "PROCEDURE_CODE",
                table: "T_BAD",
                type: "NVARCHAR2(50)",
                maxLength: 50,
                nullable: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "PROCEDURE_CODE",
                table: "T_BAD");

            migrationBuilder.AlterColumn<string>(
                name: "TYPE",
                table: "T_BAD",
                type: "NVARCHAR2(600)",
                maxLength: 600,
                nullable: true,
                oldClrType: typeof(string),
                oldType: "NVARCHAR2(20)",
                oldMaxLength: 20,
                oldNullable: true);

            migrationBuilder.AlterColumn<string>(
                name: "BAD_NAME",
                table: "T_BAD",
                type: "NVARCHAR2(600)",
                maxLength: 600,
                nullable: true,
                oldClrType: typeof(string),
                oldType: "NVARCHAR2(50)",
                oldMaxLength: 50,
                oldNullable: true);
        }
    }
}
